function WayPoint (points) {
  this.points = points;
}

WayPoint.prototype.getNextPoint = function(pointer) {
  if (this.points[pointer + 1]) {
    return { x: this.points[pointer + 1].x, y: this.points[pointer + 1].y};
  }
  return false;
};

WayPoint.prototype.getPoint = function(pointer) {
  if (this.points[pointer]) {
    return { x: this.points[pointer].x, y: this.points[pointer].y};
  }
  return false;
};